<template>
    <!-- 容器 -->
    <div class="charts" ref="charts"></div>
</template>

<script>
//引入echarts
import * as echarts from 'echarts';

export default {
    name: 'barCharts',
    mounted() {
        // 基于准备好的dom，初始化echarts实例
        let myChart = echarts.init(this.$refs.charts);
        // 绘制图表
        myChart.setOption({
            xAxis: {
                //隐藏x轴
                show: false,
                type: 'category',
            },
            yAxis: {
                //隐藏y轴
                show: false
            },
            series: [
                {
                    data: [120, 200, 150, 80, 70, 110, 130, 65, 95, 44, 55, 650],
                    type: 'bar',
                    color:'pink'
                }
            ],
            //布局调试
            grid: {
                left: 0,
                top: 0,
                right: 0,
                bottom: 0
            }
        });
    },
    methods: {

    },
};
</script>

<style  scoped>
.charts {
    width: 100%;
    height: 100%;
}
</style>